<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{:$i->title}</title>
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/admin.css" rel="stylesheet" type="text/css" />
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/common/tooltip.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.tooltip.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.boxy.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/common.js"></script>
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/common/boxy.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	$(".helpTip").tooltip({cssClass:"tooltip", xOffset:30, opacity:5, duration:1000});
});

function selAll(name)
{
	$("input[name='"+name+"']").attr("checked", true);
}

function selAnti(name)
{
	$("input[name='"+name+"']").each(function(i){
		this.checked=!this.checked;
	});
}

function del(name){
	var ids='';
	$("input:checked[name='"+name+"']").each(function(i){
		ids+=this.value+',';
	});
	if(ids.length==0)
	{
		alert('您还没有选中要删除的记录！');
		return false;
	}
	ids = ids.substr(0,ids.length-1)
	if(confirm('确定要删除ID为'+ids+'的记录吗？'))
	{
		getDialog('{:$smarty.const.BOOT_URL}/{:$i->c}/{:$i->m}/del/'+ids, '{:$smarty.const.BOOT_URL}/{:$i->c}/{:$i->m}/lists', 3, 'width:250px;text-align:center;');
	}
}
</script>
</head>
<body>
<div class="wrapper">
  <div class="title shadow titleBg">
    <table width="100%" border="0" cellspacing="1">
      <tr>
        <td><h1> {:$i->title} <span>[<a href="{:$smarty.const.BOOT_URL}/{:$i->c}/{:$i->m}/add">添加</a>]</span></h1></td>
      </tr>
    </table>
  </div>  
  <div class="content shadow">
    <table width="100%" border="0" cellspacing="1">
      <tr class="titleBg">
        <th scope="col">#ID</th>
        <th scope="col">选择</th>
        <th scope="col">昵称</th>
        <th scope="col">IP</th>
        <th scope="col">评论时间</th>
        <th scope="col">评论内容</th>
        <th scope="col">操作</th>
      </tr>
      {:foreach item=item from=$i->lists}<tr>
        <td>{:$item->id}</td>
        <td><input name="selected[]" type="checkbox" value="{:$item->id}" class="noBorder" /></td>
        <td>{:$item->uname|default:'匿名网友'}</td>
        <td>{:$item->ip}</td>
        <td>{:$item->time|date_format:"%Y-%m-%d %H:%M:%S"}</td>
        <td title="{:$item->message}" class="helpTip">点击查看</td>
        <td><a href="{:$smarty.const.BOOT_URL}/{:$i->c}/{:$i->m}/mod/{:$item->id}">修改</a> | <a onclick="if(confirm('确定要删除？')){getDialog('{:$smarty.const.BOOT_URL}/{:$i->c}/{:$i->m}/del/{:$item->id}', '{:$smarty.const.BOOT_URL}/{:$i->c}/{:$i->m}/lists', 3, 'width:250px;text-align:center;');}return false;" href="#@">删除</a></td>
      </tr>{:/foreach}       
      <tr>
        <td colspan="7" class="lightGreyBg textL"> <a href="#@" onclick="selAll('selected[]');">全选</a> | <a href="#@" onclick="selAnti('selected[]');">反选</a> | <a href="#@" onclick="dels('selected[]');">删除</a> | {:$i->pagesCode}</td>
      </tr>
    </table>
  </div>
</div>
</body>
</html>
